﻿using System;
using System.ComponentModel;
using System.Drawing.Design;
using UtfprLibrary.ComponentModel.Security;

namespace UtfprLibrary.Windows.Forms.ComponentModel.Security {
    /// <summary>
    /// TODO
    /// </summary>
    [Serializable()]
    [Editor(typeof(UtfprRestrictionEditor), typeof(UITypeEditor))]
    internal class UtfprKeyNameByDesign : IUtfprKeyName {
        /// <summary>
        /// TODO
        /// </summary>
        /// <param name="key"></param>
        /// <param name="name"></param>
        public UtfprKeyNameByDesign(int key, string name) {
            this._key = key;
            this._name = name;
        }

        private int _key;
        /// <summary>
        /// TODO
        /// </summary>
        public int Key {
            get { return _key; }
            set { _key = value; }
        }

        private string _name;
        /// <summary>
        /// TODO
        /// </summary>
        public string Name {
            get { return _name; }
            set { _name = value; }
        }

        /// <summary>
        /// TODO
        /// </summary>
        /// <returns></returns>
        public override string ToString() {
            return this._name;
        }
    }
}
